CPPFLAGS=-c -o -pthread -I"headers"
COMPILE=gcc $(CPPFLAGS)
EXENAME=runme


# All Targets
all: dir project

clean :
	rm -d target/
dir:
	mkdir -p target
	
project: target/Shell.o target/Mailer.o target/MultiLevel.o target/OSScheduler.o target/OSScheduler.o target/OSThread.o target/RoundRobin.o target/RoutingTable.o target/Worker.o target/KillMessage.o target/Message.o target/ReviveMessage.o target/RoutingMessage.o target/SystemMessage.o
	gcc -o $(EXENAME) $^

# Mailbox.cpp
target/Mailbox.o: Mailbox.cpp
	$(COMPILE) target/Mailbox.o Mailbox.cpp
# Mailer.cpp
target/Mailer.o: Mailer.cpp
	$(COMPILE) target/Mailer.o Mailer.cpp
# MultiLevel.cpp
target/MultiLevel.o: MultiLevel.cpp
	$(COMPILE) target/MultiLevel.o MultiLevel.cpp
# OSScheduler.cpp
target/OSScheduler.o: OSScheduler.cpp
	$(COMPILE) target/OSScheduler.o OSScheduler.cpp
# OSThread.cpp
target/OSThread.o: OSThread.cpp
	$(COMPILE) target/OSThread.o OSThread.cpp
# RoundRobin.cpp
target/RoundRobin.o: RoundRobin.cpp
	$(COMPILE) target/RoundRobin.o RoundRobin.cpp
# RoutingTable.cpp
target/RoutingTable.o: RoutingTable.cpp
	$(COMPILE) target/RoutingTable.o RoutingTable.cpp
# Shell.cpp
target/Shell.o: cpp/Shell.cpp
	$(COMPILE) target/Shell.o cpp/Shell.cpp
# Worker.cpp
target/Worker.o: Worker.cpp
	$(COMPILE) target/Worker.o Worker.cpp
# KillMessage.cpp
target/KillMessage.o: KillMessage.cpp
	$(COMPILE) target/KillMessage.o KillMessage.cpp
# Message.cpp
target/Message.o: Message.cpp
	$(COMPILE) target/Message.o Message.cpp
# ReviveMessage.cpp
target/ReviveMessage.o: ReviveMessage.cpp
	$(COMPILE) target/ReviveMessage.o ReviveMessage.cpp
# RoutingMessage.cpp
target/RoutingMessage.o: RoutingMessage.cpp
	$(COMPILE) target/RoutingMessage.o RoutingMessage.cpp
# SystemMessage.cpp
target/SystemMessage.o: SystemMessage.cpp
	$(COMPILE) target/SystemMessage.o SystemMessage.cpp
	